<template>
    <a-drawer width="100%" :body-style="{ paddingBottom: '80px', background: '#f0f2f5' }" :width="1000" :visible="isShow"
        placement="right" :get-container="false"  :style="{ position: 'absolute'}"  :closable="false"
        :footer-style="{ textAlign: 'right' }">
        <a-card class="mb-2">
            <a-row :gutter="24">
                <a-col :span="20">
                    <!-- <div class=" mb-2 text-left font-semibold  text-lg flex flex-row"
                        style="font-weight: 600;font-size: 16px;">
                        {{ info.name }} 
                    </div> -->
                    <div class="flex flex-row text-center">
                        <div class="w-32 ">
                            <div class="mb-2">业主名称</div>
                            <div style="font-weight: 600;">{{info.partyA}}</div>
                        </div>
                        <div class="w-32 ">
                            <div class="mb-2">合同类型</div>
                            <div style="font-weight: 600;">  {{ info.type == "1" ? "销售合同" : "施工合同" }}</div>
                        </div>
                        <div class="w-32 ">
                            <div class="mb-2">合同金额（万元）</div>
                            <div style="font-weight: 600;">{{ info.amount }}</div>
                        </div>
                        <!-- <div class="w-32">
                            <div class="mb-2">未付金额（万元）</div>
                            <div style="font-weight: 600;">2000</div>
                        </div> -->
                        <!-- <div class="w-32 ">
                            <div class="mb-2">创建人</div>
                            <div style="font-weight: 600;">{{ info.createUserName }}</div>
                        </div> -->
                        <div class="w-32 " >
                            <div class="mb-2">申请人</div>
                            <div style="font-weight: 600;">{{info.createUserName}}</div>
                        </div>
                        <div class="w-32 ">
                            <div class="mb-2">提审状态</div>
                            <div style="font-weight: 600;">{{info.stateText}}</div>
                        </div>
                        <div  class="w-32 ">
                            <div class="mb-2">所属部门</div>
                            <div style="font-weight: 600;">{{info.orgName}}</div>
                        </div>
                    </div>
                </a-col>
                <a-col :span="4" class="text-right">
                    <a-button @click="isShow = false">返回</a-button>
                </a-col>
            </a-row>
        </a-card>
        <a-card class="mb-2">
            <a-tabs>
                <a-tab-pane key="1" tab="详细信息">
                    <edit :disabled="true" ref="editRef"></edit>
                </a-tab-pane>
                <!-- <a-tab-pane key="2" tab="洽商变更">
                    <negotiateChanges :id="id"></negotiateChanges>
                </a-tab-pane>
                <a-tab-pane key="3" tab="回款">
                    <paymentCollection :id="id"></paymentCollection>
                </a-tab-pane>
                <a-tab-pane key="4" tab="开票">
                    <invoicing :id="id"></invoicing>
                </a-tab-pane> -->
                <a-tab-pane key="5" tab="审核流程">    
                    <taskInfo :id="info.processId">
                    </taskInfo>
                </a-tab-pane>
            </a-tabs> </a-card>
    </a-drawer>
</template>
<script setup>
import taskInfo from '@/components/Task/info.vue'
import edit from '@/views/flw/customform/contract/components/revenueContract/edit.vue';
import negotiateChanges from './negotiateChanges.vue';
import paymentCollection from './paymentCollection.vue';
import invoicing from './invoicing.vue';
const isShow = ref(false)
const editRef = ref();
const info = ref({})
const show = (record) => {
    isShow.value = true
    editRef.value.show(record)
    info.value = { ...record }
}
defineExpose({
    show
});

</script>